package cn.bonoon.controllers.faq;

import cn.bonoon.kernel.annotations.Cutoff;
import cn.bonoon.kernel.annotations.CutoffType;
import cn.bonoon.kernel.annotations.Transform;
import cn.bonoon.kernel.annotations.TransformField;
import cn.bonoon.kernel.support.models.AbstractItem;
import cn.bonoon.kernel.web.annotations.grid.AsColumn;
import cn.bonoon.kernel.web.annotations.grid.AsDataGrid;
import cn.bonoon.kernel.web.annotations.grid.GridOptions;

@Transform
@AsDataGrid(condition = FaqCondition.class, value = @GridOptions(operationWith = 180, fitColumns = true))
public class FaqItem extends AbstractItem implements FaqDefine {

	private static final long serialVersionUID = 2951951601927726162L;

	@AsColumn(width = 60, ordinal = 0)
	private String ordinal;
	@AsColumn(width = 120, ordinal = 1)
	@TransformField("catalog.name")
	private String catalog;
	
	@AsColumn(width = 300, ordinal = 11)
	@Cutoff(100)
	private String question;
	@AsColumn(width = 200, ordinal = 12)
	@Cutoff(value = 50, type = CutoffType.HTML)
	private String answer;

	@AsColumn(width = 80, ordinal = 50)
	private String level;
	@AsColumn(width = 60, ordinal = 51)
	private String disable;
	public String getOrdinal() {
		return ordinal;
	}
	public void setOrdinal(String ordinal) {
		this.ordinal = ordinal;
	}
	public String getCatalog() {
		return catalog;
	}
	public void setCatalog(String catalog) {
		this.catalog = catalog;
	}
	public String getQuestion() {
		return question;
	}
	public void setQuestion(String question) {
		this.question = question;
	}
	public String getAnswer() {
		return answer;
	}
	public void setAnswer(String answer) {
		this.answer = answer;
	}
	public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public String getDisable() {
		return disable;
	}
	public void setDisable(String disable) {
		this.disable = disable;
	}

}
